import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
//import AMap from 'vue-amap'; // 高德地图
import BaiduMap from 'vue-baidu-map'
import VueVideoPlayer from 'vue-video-player'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/iconfont/iconfont.js'
import './assets/iconfont/iconfont.css'
import 'video.js/dist/video-js.css'

Vue.config.productionTip = false

Vue.use(ElementUI)
Vue.use(VueVideoPlayer)
Vue.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'rVdHTks49zgSOtxQFhO6fLDaclQGudxf'
})
//Vue.use(AMap)
//AMap.initAMapApiLoader({
//      key: '546def468d906835bf3625ccc6d0cd30',
//      plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.Geolocation'],
//      uiVersion: "1.0.11", // ui库版本，不配置不加载,
//      v: '1.4.15'
//    });
   
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) { //移动端
  console.log('移动端')
  localStorage.setItem('terminalm', 'ph')
} else {
  localStorage.setItem('terminalm', 'pc')
  console.log('pc')
}

new Vue({
  router,
  store,
  render: h => h(App),
  // mounted () {
  //   document.dispatchEvent(new Event('render-event'))
  //   }
}).$mount('#app')
